{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport Dropdown from 'rc-dropdown';\nimport Menu, { MenuItem } from 'rc-menu';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport AddButton from \"./AddButton\";\nfunction OperationNode(_ref, ref) {\n  var prefixCls = _ref.prefixCls,\n    id = _ref.id,\n    tabs = _ref.tabs,\n    locale = _ref.locale,\n    mobile = _ref.mobile,\n    _ref$moreIcon = _ref.moreIcon,\n    moreIcon = _ref$moreIcon === void 0 ? 'More' : _ref$moreIcon,\n    moreTransitionName = _ref.moreTransitionName,\n    style = _ref.style,\n    className = _ref.className,\n    editable = _ref.editable,\n    tabBarGutter = _ref.tabBarGutter,\n    rtl = _ref.rtl,\n    removeAriaLabel = _ref.removeAriaLabel,\n    onTabClick = _ref.onTabClick,\n    getPopupContainer = _ref.getPopupContainer,\n    popupClassName = _ref.popupClassName;\n\n  // ======================== Dropdown ========================\n  var _useState = useState(false),\n    _useState2 = _slicedToArray(_useState, 2),\n    open = _useState2[0],\n    setOpen = _useState2[1];\n  var _useState3 = useState(null),\n    _useState4 = _slicedToArray(_useState3, 2),\n    selectedKey = _useState4[0],\n    setSelectedKey = _useState4[1];\n  var popupId = \"\".concat(id, \"-more-popup\");\n  var dropdownPrefix = \"\".concat(prefixCls, \"-dropdown\");\n  var selectedItemId = selectedKey !== null ? \"\".concat(popupId, \"-\").concat(selectedKey) : null;\n  var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel;\n  function onRemoveTab(event, key) {\n    event.preventDefault();\n    event.stopPropagation();\n    editable.onEdit('remove', {\n      key: key,\n      event: event\n    });\n  }\n  var menu = /*#__PURE__*/React.createElement(Menu, {\n    onClick: function onClick(_ref2) {\n      var key = _ref2.key,\n        domEvent = _ref2.domEvent;\n      onTabClick(key, domEvent);\n      setOpen(false);\n    },\n    prefixCls: \"\".concat(dropdownPrefix, \"-menu\"),\n    id: popupId,\n    tabIndex: -1,\n    role: \"listbox\",\n    \"aria-activedescendant\": selectedItemId,\n    selectedKeys: [selectedKey],\n    \"aria-label\": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown'\n  }, tabs.map(function (tab) {\n    var removable = editable && tab.closable !== false && !tab.disabled;\n    return /*#__PURE__*/React.createElement(MenuItem, {\n      key: tab.key,\n      id: \"\".concat(popupId, \"-\").concat(tab.key),\n      role: \"option\",\n      \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(tab.key),\n      disabled: tab.disabled\n    }, /*#__PURE__*/React.createElement(\"span\", null, tab.label), removable && /*#__PURE__*/React.createElement(\"button\", {\n      type: \"button\",\n      \"aria-label\": removeAriaLabel || 'remove',\n      tabIndex: 0,\n      className: \"\".concat(dropdownPrefix, \"-menu-item-remove\"),\n      onClick: function onClick(e) {\n        e.stopPropagation();\n        onRemoveTab(e, tab.key);\n      }\n    }, tab.closeIcon || editable.removeIcon || '×'));\n  }));\n  function selectOffset(offset) {\n    var enabledTabs = tabs.filter(function (tab) {\n      return !tab.disabled;\n    });\n    var selectedIndex = enabledTabs.findIndex(function (tab) {\n      return tab.key === selectedKey;\n    }) || 0;\n    var len = enabledTabs.length;\n    for (var i = 0; i < len; i += 1) {\n      selectedIndex = (selectedIndex + offset + len) % len;\n      var tab = enabledTabs[selectedIndex];\n      if (!tab.disabled) {\n        setSelectedKey(tab.key);\n        return;\n      }\n    }\n  }\n  function onKeyDown(e) {\n    var which = e.which;\n    if (!open) {\n      if ([KeyCode.DOWN, KeyCode.SPACE, KeyCode.ENTER].includes(which)) {\n        setOpen(true);\n        e.preventDefault();\n      }\n      return;\n    }\n    switch (which) {\n      case KeyCode.UP:\n        selectOffset(-1);\n        e.preventDefault();\n        break;\n      case KeyCode.DOWN:\n        selectOffset(1);\n        e.preventDefault();\n        break;\n      case KeyCode.ESC:\n        setOpen(false);\n        break;\n      case KeyCode.SPACE:\n      case KeyCode.ENTER:\n        if (selectedKey !== null) onTabClick(selectedKey, e);\n        break;\n    }\n  } // ========================= Effect =========================\n\n  useEffect(function () {\n    // We use query element here to avoid React strict warning\n    var ele = document.getElementById(selectedItemId);\n    if (ele && ele.scrollIntoView) {\n      ele.scrollIntoView(false);\n    }\n  }, [selectedKey]);\n  useEffect(function () {\n    if (!open) {\n      setSelectedKey(null);\n    }\n  }, [open]); // ========================= Render =========================\n\n  var moreStyle = _defineProperty({}, rtl ? 'marginRight' : 'marginLeft', tabBarGutter);\n  if (!tabs.length) {\n    moreStyle.visibility = 'hidden';\n    moreStyle.order = 1;\n  }\n  var overlayClassName = classNames(_defineProperty({}, \"\".concat(dropdownPrefix, \"-rtl\"), rtl));\n  var moreNode = mobile ? null : /*#__PURE__*/React.createElement(Dropdown, {\n    prefixCls: dropdownPrefix,\n    overlay: menu,\n    trigger: ['hover'],\n    visible: tabs.length ? open : false,\n    transitionName: moreTransitionName,\n    onVisibleChange: setOpen,\n    overlayClassName: classNames(overlayClassName, popupClassName),\n    mouseEnterDelay: 0.1,\n    mouseLeaveDelay: 0.1,\n    getPopupContainer: getPopupContainer\n  }, /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    className: \"\".concat(prefixCls, \"-nav-more\"),\n    style: moreStyle,\n    tabIndex: -1,\n    \"aria-hidden\": \"true\",\n    \"aria-haspopup\": \"listbox\",\n    \"aria-controls\": popupId,\n    id: \"\".concat(id, \"-more\"),\n    \"aria-expanded\": open,\n    onKeyDown: onKeyDown\n  }, moreIcon));\n  return /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-nav-operations\"), className),\n    style: style,\n    ref: ref\n  }, moreNode, /*#__PURE__*/React.createElement(AddButton, {\n    prefixCls: prefixCls,\n    locale: locale,\n    editable: editable\n  }));\n}\nexport default /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(OperationNode), function (_, next) {\n  return (\n    // https://github.com/ant-design/ant-design/issues/32544\n    // We'd better remove syntactic sugar in `rc-menu` since this has perf issue\n    next.tabMoving\n  );\n});","map":{"version":3,"names":["_defineProperty","_slicedToArray","classNames","Dropdown","Menu","MenuItem","KeyCode","React","useEffect","useState","AddButton","OperationNode","_ref","ref","prefixCls","id","tabs","locale","mobile","_ref$moreIcon","moreIcon","moreTransitionName","style","className","editable","tabBarGutter","rtl","removeAriaLabel","onTabClick","getPopupContainer","popupClassName","_useState","_useState2","open","setOpen","_useState3","_useState4","selectedKey","setSelectedKey","popupId","concat","dropdownPrefix","selectedItemId","dropdownAriaLabel","onRemoveTab","event","key","preventDefault","stopPropagation","onEdit","menu","createElement","onClick","_ref2","domEvent","tabIndex","role","selectedKeys","undefined","map","tab","removable","closable","disabled","label","type","e","closeIcon","removeIcon","selectOffset","offset","enabledTabs","filter","selectedIndex","findIndex","len","length","i","onKeyDown","which","DOWN","SPACE","ENTER","includes","UP","ESC","ele","document","getElementById","scrollIntoView","moreStyle","visibility","order","overlayClassName","moreNode","overlay","trigger","visible","transitionName","onVisibleChange","mouseEnterDelay","mouseLeaveDelay","memo","forwardRef","_","next","tabMoving"],"sources":["/data/messenger.client/node_modules/rc-tabs/es/TabNavList/OperationNode.js"],"sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport classNames from 'classnames';\nimport Dropdown from 'rc-dropdown';\nimport Menu, { MenuItem } from 'rc-menu';\nimport KeyCode from \"rc-util/es/KeyCode\";\nimport * as React from 'react';\nimport { useEffect, useState } from 'react';\nimport AddButton from \"./AddButton\";\n\nfunction OperationNode(_ref, ref) {\n  var prefixCls = _ref.prefixCls,\n      id = _ref.id,\n      tabs = _ref.tabs,\n      locale = _ref.locale,\n      mobile = _ref.mobile,\n      _ref$moreIcon = _ref.moreIcon,\n      moreIcon = _ref$moreIcon === void 0 ? 'More' : _ref$moreIcon,\n      moreTransitionName = _ref.moreTransitionName,\n      style = _ref.style,\n      className = _ref.className,\n      editable = _ref.editable,\n      tabBarGutter = _ref.tabBarGutter,\n      rtl = _ref.rtl,\n      removeAriaLabel = _ref.removeAriaLabel,\n      onTabClick = _ref.onTabClick,\n      getPopupContainer = _ref.getPopupContainer,\n      popupClassName = _ref.popupClassName;\n\n  // ======================== Dropdown ========================\n  var _useState = useState(false),\n      _useState2 = _slicedToArray(_useState, 2),\n      open = _useState2[0],\n      setOpen = _useState2[1];\n\n  var _useState3 = useState(null),\n      _useState4 = _slicedToArray(_useState3, 2),\n      selectedKey = _useState4[0],\n      setSelectedKey = _useState4[1];\n\n  var popupId = \"\".concat(id, \"-more-popup\");\n  var dropdownPrefix = \"\".concat(prefixCls, \"-dropdown\");\n  var selectedItemId = selectedKey !== null ? \"\".concat(popupId, \"-\").concat(selectedKey) : null;\n  var dropdownAriaLabel = locale === null || locale === void 0 ? void 0 : locale.dropdownAriaLabel;\n\n  function onRemoveTab(event, key) {\n    event.preventDefault();\n    event.stopPropagation();\n    editable.onEdit('remove', {\n      key: key,\n      event: event\n    });\n  }\n\n  var menu = /*#__PURE__*/React.createElement(Menu, {\n    onClick: function onClick(_ref2) {\n      var key = _ref2.key,\n          domEvent = _ref2.domEvent;\n      onTabClick(key, domEvent);\n      setOpen(false);\n    },\n    prefixCls: \"\".concat(dropdownPrefix, \"-menu\"),\n    id: popupId,\n    tabIndex: -1,\n    role: \"listbox\",\n    \"aria-activedescendant\": selectedItemId,\n    selectedKeys: [selectedKey],\n    \"aria-label\": dropdownAriaLabel !== undefined ? dropdownAriaLabel : 'expanded dropdown'\n  }, tabs.map(function (tab) {\n    var removable = editable && tab.closable !== false && !tab.disabled;\n    return /*#__PURE__*/React.createElement(MenuItem, {\n      key: tab.key,\n      id: \"\".concat(popupId, \"-\").concat(tab.key),\n      role: \"option\",\n      \"aria-controls\": id && \"\".concat(id, \"-panel-\").concat(tab.key),\n      disabled: tab.disabled\n    }, /*#__PURE__*/React.createElement(\"span\", null, tab.label), removable && /*#__PURE__*/React.createElement(\"button\", {\n      type: \"button\",\n      \"aria-label\": removeAriaLabel || 'remove',\n      tabIndex: 0,\n      className: \"\".concat(dropdownPrefix, \"-menu-item-remove\"),\n      onClick: function onClick(e) {\n        e.stopPropagation();\n        onRemoveTab(e, tab.key);\n      }\n    }, tab.closeIcon || editable.removeIcon || '×'));\n  }));\n\n  function selectOffset(offset) {\n    var enabledTabs = tabs.filter(function (tab) {\n      return !tab.disabled;\n    });\n    var selectedIndex = enabledTabs.findIndex(function (tab) {\n      return tab.key === selectedKey;\n    }) || 0;\n    var len = enabledTabs.length;\n\n    for (var i = 0; i < len; i += 1) {\n      selectedIndex = (selectedIndex + offset + len) % len;\n      var tab = enabledTabs[selectedIndex];\n\n      if (!tab.disabled) {\n        setSelectedKey(tab.key);\n        return;\n      }\n    }\n  }\n\n  function onKeyDown(e) {\n    var which = e.which;\n\n    if (!open) {\n      if ([KeyCode.DOWN, KeyCode.SPACE, KeyCode.ENTER].includes(which)) {\n        setOpen(true);\n        e.preventDefault();\n      }\n\n      return;\n    }\n\n    switch (which) {\n      case KeyCode.UP:\n        selectOffset(-1);\n        e.preventDefault();\n        break;\n\n      case KeyCode.DOWN:\n        selectOffset(1);\n        e.preventDefault();\n        break;\n\n      case KeyCode.ESC:\n        setOpen(false);\n        break;\n\n      case KeyCode.SPACE:\n      case KeyCode.ENTER:\n        if (selectedKey !== null) onTabClick(selectedKey, e);\n        break;\n    }\n  } // ========================= Effect =========================\n\n\n  useEffect(function () {\n    // We use query element here to avoid React strict warning\n    var ele = document.getElementById(selectedItemId);\n\n    if (ele && ele.scrollIntoView) {\n      ele.scrollIntoView(false);\n    }\n  }, [selectedKey]);\n  useEffect(function () {\n    if (!open) {\n      setSelectedKey(null);\n    }\n  }, [open]); // ========================= Render =========================\n\n  var moreStyle = _defineProperty({}, rtl ? 'marginRight' : 'marginLeft', tabBarGutter);\n\n  if (!tabs.length) {\n    moreStyle.visibility = 'hidden';\n    moreStyle.order = 1;\n  }\n\n  var overlayClassName = classNames(_defineProperty({}, \"\".concat(dropdownPrefix, \"-rtl\"), rtl));\n  var moreNode = mobile ? null : /*#__PURE__*/React.createElement(Dropdown, {\n    prefixCls: dropdownPrefix,\n    overlay: menu,\n    trigger: ['hover'],\n    visible: tabs.length ? open : false,\n    transitionName: moreTransitionName,\n    onVisibleChange: setOpen,\n    overlayClassName: classNames(overlayClassName, popupClassName),\n    mouseEnterDelay: 0.1,\n    mouseLeaveDelay: 0.1,\n    getPopupContainer: getPopupContainer\n  }, /*#__PURE__*/React.createElement(\"button\", {\n    type: \"button\",\n    className: \"\".concat(prefixCls, \"-nav-more\"),\n    style: moreStyle,\n    tabIndex: -1,\n    \"aria-hidden\": \"true\",\n    \"aria-haspopup\": \"listbox\",\n    \"aria-controls\": popupId,\n    id: \"\".concat(id, \"-more\"),\n    \"aria-expanded\": open,\n    onKeyDown: onKeyDown\n  }, moreIcon));\n  return /*#__PURE__*/React.createElement(\"div\", {\n    className: classNames(\"\".concat(prefixCls, \"-nav-operations\"), className),\n    style: style,\n    ref: ref\n  }, moreNode, /*#__PURE__*/React.createElement(AddButton, {\n    prefixCls: prefixCls,\n    locale: locale,\n    editable: editable\n  }));\n}\n\nexport default /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(OperationNode), function (_, next) {\n  return (// https://github.com/ant-design/ant-design/issues/32544\n    // We'd better remove syntactic sugar in `rc-menu` since this has perf issue\n    next.tabMoving\n  );\n});"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,IAAI,IAAIC,QAAQ,QAAQ,SAAS;AACxC,OAAOC,OAAO,MAAM,oBAAoB;AACxC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAA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